package com.supplychainapi.service;

import com.joindata.inf.common.basic.exceptions.ServiceException;
import com.supplychainapi.domain.HQPurchaseParam;
import com.supplychainapi.domain.LoginCache;
import com.supplychainapi.domain.Tbpurchase;
import com.supplychainapi.model.ScmTbpurchase;
import com.supplychainapi.param.PurchaseParam;

import java.util.List;

/**
 *
 * 采购订单
 * @author:xiezhiwei
 * @email:xiezhiwei@niwodai.net
 * @date:2017-11-27
 *
 */
public interface IScmTbpurchaseService {

    List<ScmTbpurchase> getPurchaseListInfo(PurchaseParam purchaseParam) throws ServiceException;

    int save(ScmTbpurchase model) throws ServiceException;

    int delete(ScmTbpurchase model) throws ServiceException;

    List<ScmTbpurchase> search(String shopGuid, Integer pageNum, Integer pageSize, String keyWords, String fiBillStatus) throws ServiceException;

    ScmTbpurchase selectById(String fsPurchaseGUID) throws ServiceException;


    int update(Tbpurchase model) throws ServiceException;
    
    /**
     * 单个采购订单下单
     * @param purchase
     * @return
     * @throws ServiceException
     */
    int addHeadquarters(ScmTbpurchase purchase) throws ServiceException;
    
    /**
     * 总部进货下单
     * @param loginCache
     * @param purchase
     * @return
     * @throws ServiceException
     */
	int addHeadquarters(LoginCache loginCache, HQPurchaseParam purchase)throws ServiceException;
}
